from loguru import logger

import repo
from filepath import CrossPlatformPath

if __name__ == '__main__':
    try:
        # 创建 Repo 对象
        logger.info("")
        default_path = CrossPlatformPath.default_path().get_path()
        logger.info("default_path：" + default_path)
        r = repo.Repo(default_path)

        # 输出仓库信息
        logger.info("repo.git：" + str(r.git))
        logger.info("repo.path：" + r.path)
        logger.info("repo.bare：" + str(r.bare))
        logger.info("repo.description：" + str(r.description))

    except Exception as e:
        logger.error(f"创建仓库对象时出错: {e}")
